#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>

bool canMakeArithmeticProgression(int* arr, int arrSize)
{
    for (int j = 0; j < arrSize - 1; j++)
    {
        for (int i = 0; i < arrSize - 1 - j; i++)
        {
            int temp = 0;
            if (arr[i + 1] < arr[i])
            {
                temp = arr[i + 1];
                arr[i + 1] = arr[i];
                arr[i] = temp;
            }
        }
    }

    int* difference = (int*)malloc((arrSize - 1) * sizeof(int));
    if (difference == NULL)
    {
        return false;
    }
    for (int i = 0; i < arrSize - 1; i++)
    {
        difference[i] = arr[i + 1] - arr[i];
    }
    for (int i = 0; i < arrSize - 2; i++)
    {
        if (difference[i] != difference[i + 1])
        {
            return false;
        }
    }
    return true;
}

int main()
{
	return 0;
}